<include file="Admin@Public:header" />
<!-- end nav -->

<!-- begin container -->
<div class=" container-fuid ">
	<div class="row">
		<div class="col-lg-12 col-md-12 col-xs-12" style="background-color: #FFF;">
			<!-- begin tab -->
			<ul class="nav nav-tabs " >
				<li class="active">
					<a href="{:U('Food/Admin/index')}" >
						<b>商品列表</b>
					</a>
				</li>
				<li>
					<a href="{:U('Food/Admin/add')}" >
						<b>商品增加</b>
					</a>
				</li>
			</ul>
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>菜名</th>
						<th>价格</th>
						<th>分类</th>
						<th>排序</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<volist name="foodlist" id="vo">
						<tr>
							<td>{$vo.fname}</td>
							<td>{$vo.fprice}</td>
							<td>{$vo.fcname}</td>
							<td>{$vo.fsort}</td>
							<td>
								<div class="btn-group">
									<if condition="$vo['isrecommend']">
									<a href="{:U('Food/Admin/recommend',array('id'=>$vo['fid'],'recom'=>0))}" class="btn btn-success"> <i class="fa fa-trash-o"></i>
										取消推荐
									</a>
									<else/>
									<a href="{:U('Food/Admin/recommend',array('id'=>$vo['fid'],'recom'=>1))}" class="btn btn-success"> <i class="fa fa-trash-o"></i>
										推荐
									</a>
									</if>

									<a href="{:U('Food/Admin/edit','id='.$vo['fid'])}" class="btn btn-info"> <i class="fa fa-trash-o"></i>
										修改
									</a>
									<a href="{:U('Food/Admin/del','id='.$vo['fid'])}" class="btn btn-danger">
										<i class="fa fa-trash-o"></i>
										删除
									</a>
								</div>
							</td>
						</tr>
					</volist>
				</tbody>
			</table>
			<div class="page">{$page}</div>
		</div>
		<!-- col end -->
	</div>
	<!-- end row -->
</div>
<!-- end container -->
<!-- /.modal -->
<!-- END FOOTER -->
<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
<!-- BEGIN CORE PLUGINS -->
<script >
	
	$('#myModal').on('hidden.bs.modal', function (e) {
	location.reload()

})
$('#ajax').on('hidden.bs.modal', function (e) {
	location.reload()

})


function delcfm() {
if (!confirm("确认要删除？")) {
window.event.returnValue = false;
}
}
</script>
<include file="Admin@Public:footer" />